package com.joysuch.wwyt.mh.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 描述：监测点显示状态枚举<br>
 *
 * @author jingwk<br>
 * @version 1.0 <br>
 * 日期:2021年03月30日 上午10:57:00
 */
public enum PointShowStateEnum {

    NOT_DISPLAYED(0, "不显示"),
    DISPLAYED(1, "显示");

    private Integer value;

    private String desc;

    PointShowStateEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<Integer, PointShowStateEnum> lookup = new HashMap<>();

    static {
        for (PointShowStateEnum e : EnumSet.allOf(PointShowStateEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static PointShowStateEnum find(String value) {
        return lookup.get(value);
    }
}
